package com.sgzn.sgpay.util.httpClient;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

/**
 * Created by xxjs-gd-llf
 * DATETIME:2018/4/4 14:26
 * Description:
 */
@Getter
@Setter
@ToString
public class HttpResultDto<T> {

    /**
     * 状态码
     */
    private Boolean isSuccess;
    /**
     * 错误码
     * */
    private String errorCode;
    /**
     * 错误miaos
     * */
    private String errorMsg;

    /**
     * 返回数据
     * */
    private T result;

    public void setError(String errorCode,String errorMsg){
        this.isSuccess = false;
        this.errorCode = errorCode;
        this.errorMsg = errorMsg;
    }

    public void setResult(T result){
        this.isSuccess = true;
        this.result = result;
    }




}
